#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>

int main()
{
    key_t key;

    printf("key = [%ld]\n", key);
    key = ftok("./test", 1);
    if(key < 0)
    {
        printf("key = [%ld]\n", key);
        perror("ftok:");
        return -1;
    }
    printf("key = [%ld]\n", key);

    return 0;
}
